package com.hy.medicine.dingdan.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 购物车添加请求VO
 */
@Data
@ApiModel(value = "购物车添加请求")
public class CartItemAddVO {

    @ApiModelProperty("药品ID")
    @NotNull(message = "药品ID不能为空")
    private Integer medicineId;

    @ApiModelProperty("购买数量")
    @NotNull(message = "购买数量不能为空")
    @Min(value = 1, message = "购买数量必须大于0")
    private Integer quantity;
}
